package com.lh.service.impl;

import com.lh.dao.AdvertisementDao;
import com.lh.entity.Advertisement;
import com.lh.service.AdvertisementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: LuoHang
 * @Date: 2021/2/14 0:12
 * @Description
 */
@Service
public class AdvertisementServiceImpl implements AdvertisementService {
    @Autowired
    private AdvertisementDao advertisementDao;

    @Override
    public List<Advertisement> getAdvertisements(Map<String, Object> map) {
        return advertisementDao.getAdvertisements(map);
    }

    @Override
    public int getCount(Map<String, Object> map) {
        return advertisementDao.getCount(map);
    }

    @Override
    public Advertisement getAdvertisementById(Integer id) {
        return advertisementDao.getAdvertisementById(id);
    }

    @Override
    public int addAdvertisement(Advertisement advertisement) {
        return advertisementDao.addAdvertisement(advertisement);
    }

    @Override
    public int updateAdvertisement(Map<String, Object> map) {
        return advertisementDao.updateAdvertisement(map);
    }

    @Override
    public int deleteAdvertisementById(Integer id) {
        return advertisementDao.deleteAdvertisementById(id);
    }
}
